<template>
	<div>
		<p>Model</p>
		<input type="text" v-model="msg" />
		<p>拆分v-model:将data中的某个响应式数据的值作为默认值在input框中进行展示</p>
		<input type="text" :value="msg" />
		<p>
			拆分v-model:当用户修改输入框的内容时,会同步修改data中对应的响应式属性的值
		</p>
		<input type="text" @input="(event) => (msg = event.target.value)" />

		<h1>{{ msg }}</h1>
		<!-- <Son v-model="msg" /> -->
		<Son :value="msg" @input="(data) => (msg = data)" />
	</div>
</template>
<script>
import Son from "./Son.vue";
export default {
	name: "",
	components: { Son },
	data() {
		return { msg: "原始msg" };
	},

	mounted() {},
	methods: {},
};
</script>
<style lang="" scoped></style>
